package cn.iocoder.yudao.module.api.product.spu.dto;

import cn.hutool.core.collection.CollUtil;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.List;

/**
 * 产品 SPU 信息 Response DTO
 *
 * @author 山野羡民
 * @since 2025/01/16
 */
@Data
public class ProductSpuDetailRespDTO extends ProductSpuRespDTO {

    /**
     * 产品轮播图
     */
    private List<String> sliderPicUrls;

    @SuppressWarnings("unused")
    public List<String> getSliderPicUrls() {
        if (CollUtil.isEmpty(sliderPicUrls)) {
            sliderPicUrls = CollUtil.newArrayList(getPicUrl());
        }
        return sliderPicUrls;
    }

    /**
     * 产品简介
     */
    private String introduction;
    /**
     * 产品详情
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String description;

}
